package com.qfedu.fmmall.controller;

import com.qfedu.fmmall.service.UserAddrService;
import com.qfedu.fmmall.vo.ResultVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Api(value = "提供收货地址相关接口",tags = "收货地址管理")
@RequestMapping("/useraddr")
public class UserAddrController {
   @Resource
    private UserAddrService userAddrService;
   @ApiOperation(value = "查询用户收货地址接口",tags = "查询用户收货地址接口")
    @GetMapping("/list")
   @ApiImplicitParam(name = "userId",type ="int",value = "用户id")
    public ResultVO selectOne(@RequestParam(required = true) Integer userId){
     return   userAddrService.selectList(userId);
   }


}
